<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/publicLayout.xhtml">
	
	<ui:define name="head">
		<style>
			.labels{
				width: 150px;
				text-align: right;
			}
			
		</style>
		
	</ui:define>
	<ui:define name="bodyContent">

		<p:panel header="User Login Form" style="width:400px; margin: 0 auto;">

			<h:form id="loginForm">

				<p:messages autoUpdate="true"/>
				<h:panelGrid columns="2" columnClasses="labels">
					<p:outputLabel for="email" value="Email:" />
					<p:inputText id="email" value="#{userController.loginUser.email}" label="Email" 
								required="true" requiredMessage="Email is required."/>
					
					<p:outputLabel for="password" value="Password:" />
					<p:password id="password" value="#{userController.loginUser.password}" label="Password" 
								redisplay="true"
								required="true" requiredMessage="Password is required"/>

					<p:outputLabel value=""/>
					<p:commandButton value="Login" action="#{userController.doLogin}" validateClient="true"/>
					
				</h:panelGrid>
			</h:form>
		</p:panel>

	</ui:define>
</ui:composition>